<template>
  <view>
    <!-- <Navbar></Navbar> -->
    <Navbar />
    <view>{{ userName }}</view>
    <view>{{ editName }}</view>
    <button @click="changeName('疯子阿斌')">改名字</button>
    <button @click="addName('酸酸乳')">actions改名字</button>
  </view>
</template>

<script>
import http from '@/utils/http'
import Navbar from './components/Navbar.vue'
import { mapState, mapGetters, mapMutations, mapActions } from 'vuex'
export default {
  components: { Navbar },
  computed: {
    ...mapState(['userName']),
    ...mapGetters(['editName']),
  },
  methods: {
    ...mapMutations(['changeName']),
    ...mapActions(['addName']),
  },
  async onLoad() {
    const res = await http({ url: '/home/oneStop/mutli' })
    console.log(res)
  },
}
</script>

<style >
</style>
